package com.isoftstone.demo.tree.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.isoftstone.services.base.entity.BaseEntity;

/**
 * 
 * <br>demo树的数据示例 
 * @author  tulinli
 * @version  [版本号, 2017年11月23日]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
@Entity
@Table(name = "demo_tree_node_data")
@DynamicInsert
@DynamicUpdate
public class TreeNodeData extends BaseEntity
{
    @Id
    @GeneratedValue
    @Column
    private Integer id;
    
    /**
     * 父节点id
     */
    @Column
    private Integer pId;
    
    /**
     * 节点名称
     */
    @Column
    private String name;
    
    /**
     * 节点了类型 0:根节点， 1:中间节点  ，2：叶子节点
     */
    @Column
    private Integer nodeType;
    
    public Integer getId()
    {
        return id;
    }
    
    public void setId(Integer id)
    {
        this.id = id;
    }
    
    public Integer getpId()
    {
        return pId;
    }
    
    public void setpId(Integer pId)
    {
        this.pId = pId;
    }
    
    public String getName()
    {
        return name;
    }
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public Integer getNodeType()
    {
        return nodeType;
    }
    
    public void setNodeType(Integer nodeType)
    {
        this.nodeType = nodeType;
    }
    
}
